package com.starlink.model.util;

import com.starlink.model.dtomapper.MallRefundsDtoMapper;
import com.starlink.model.domain.MallRefundsDO;
import com.starlink.model.vo.MallRefundsVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class MallRefundsConvert {

    public static List<MallRefundsVO> buildMallRefundsVoList(List<MallRefundsDO> mallRefundsDOList) {
        if (CollectionUtils.isEmpty(mallRefundsDOList)) {
            return Lists.newArrayList();
        }
        List<MallRefundsVO> mallRefundsVOList = new ArrayList<>();
        for (MallRefundsDO mallRefundsDO : mallRefundsDOList) {
            mallRefundsVOList.add(MallRefundsDtoMapper.INSTANCE.do2VO(mallRefundsDO));
        }

        return mallRefundsVOList;
    }
}
